package com.example.tiku7.p;

import com.example.tiku7.Bean;
import com.example.tiku7.m.MainModel;
import com.example.tiku7.net.CalllBack;
import com.example.tiku7.net.View_Mian;

import java.util.List;

public class Presenter implements CalllBack {
    private View_Mian view_mian;
    private MainModel mainModel;
    public Presenter(View_Mian view_mian) {
        this.view_mian = view_mian;
        mainModel=new MainModel();

    }

    @Override
    public void showData(List<Bean.ResultsBean> beanList) {
        view_mian.showbean(beanList);
    }

    @Override
    public void showToast(String str) {
        view_mian.showToast(str);
    }
    public void getData(){
        mainModel.getData(this);
    }
}
